package net.huashitong.ssydt.exam.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.08.30
 */
@ApiModel(value = "TestRecordsByIdInVo", description = "记录对象")
public class TestRecordsByIdInVo implements Serializable {

    private static final long serialVersionUID = -3118263316575206635L;
    @ApiModelProperty(value = "完成数")
    @NotNull(message = "完成数不能为空")
    private Integer finishNumber;//完成数
    @ApiModelProperty(value = "作答时间")
    @NotNull(message = "作答时间不能为空")
    private Integer userTime;//作答时间

    @ApiModelProperty(value = "选择题列表")
    @NotNull(message = "选择题列表不能为空")
    private List<TestQuestion> questions;

    public Integer getUserTime() {
        return userTime;
    }

    public void setUserTime(Integer userTime) {
        this.userTime = userTime;
    }

    public Integer getFinishNumber() {
        return finishNumber;
    }

    public void setFinishNumber(Integer finishNumber) {
        this.finishNumber = finishNumber;
    }

    public List<TestQuestion> getQuestions() {
        return questions;
    }

    public void setQuestions(List<TestQuestion> questions) {
        this.questions = questions;
    }

    /**
     * 记录题目
     */
    public static class TestQuestion implements Serializable {

        private static final long serialVersionUID = -2067846900318329211L;
        @ApiModelProperty(value = "练习记录id")
        @NotNull(message = "练习记录id不能为空")
        private Long testQuestionId;//练习记录id
        @ApiModelProperty(value = "用户选择的序号列表")
        @NotNull(message = "用户选择的序号列表不能为空")
        private List<Integer> userAnswers;//用户选择的序号列表

        public Long getTestQuestionId() {
            return testQuestionId;
        }

        public void setTestQuestionId(Long testQuestionId) {
            this.testQuestionId = testQuestionId;
        }

        public List<Integer> getUserAnswers() {
            return userAnswers;
        }

        public void setUserAnswers(List<Integer> userAnswers) {
            this.userAnswers = userAnswers;
        }
    }

}
